#region Microsoft Public License
/*
 * (c) Copyright Chenjun Wu. http://utablesdk.codeplex.com
 * 
 * This source is subject to the Microsoft Public License (Ms-PL).
 * Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
 * All other rights reserved.
 */
#endregion

﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UTable.Objects.Policies
{
    /// <summary>
    /// Abstract representation for policies of UObject
    /// </summary>
    public abstract class Policy
    {
        private IObject _target;


        public Policy(IObject target, object param)
        {
            _target = target;
        }

        /// <summary>
        /// Update the parameter of the this policy
        /// </summary>
        /// <param name="param">Parameter for the Policy</param>
        public abstract void UpdateParameter(object param);

        /// <summary>
        /// Gets or sets the UObject that this policy locates
        /// </summary>
        public IObject Target
        {
            get
            {
                return _target;
            }
            set
            {
                _target = value;
            }
        }
    }
}
